~ chicken-core (chicken-5) /manual/Module (chicken blob)
Trap1[[tags: manual]]
2[[toc:]]
3
4== Module (chicken blob)
5
6This module contains procedures for dealing with "blobs". Blobs are
7unstructured byte arrays (basically "binary strings"). You can't do
8much with them, but they allow conversion to and from
9[[Module srfi-4|SRFI-4 number vectors]] which define how to access a
10blob's byte contents.
11
12=== make-blob
13
14<procedure>(make-blob SIZE)</procedure>
15
16Returns a blob object of {{SIZE}} bytes, aligned on an 8-byte boundary,
17uninitialized.
18
19=== blob?
20
21<procedure>(blob? X)</procedure>
22
23Returns {{#t}} if {{X}} is a blob object, or
24{{#f}} otherwise.
25
26=== blob-size
27
28<procedure>(blob-size BLOB)</procedure>
29
30Returns the number of bytes in {{BLOB}}.
31
32=== blob->string
33
34<procedure>(blob->string BLOB)</procedure>
35
36Returns a string with the contents of {{BLOB}}.
37
38=== string->blob
39
40<procedure>(string->blob STRING)</procedure>
41
42Returns a blob with the contents of {{STRING}}.
43
44=== blob=?
45
46<procedure>(blob=? BLOB1 BLOB2)</procedure>
47
48Returns {{#t}} if the two argument blobs are of the same
49size and have the same content.
50
51
52---
53Previous: [[Module (chicken bitwise)]]
54
55Next: [[Module (chicken condition)]]